In current data communications systems, asynchronous, serial digital data is generated at data terminal devices, generally called data terminal equipment (DTE). Typically, the DTE is a personal computer (PC), such as those made by International Bushess Machines Corp. or Apple Computer, Inc., or the like. The DTEs are versatile devices that can communicate digital signals at a plurality of speeds, including relatively high speeds. For example, current bit rates include 14,400 bits per second (14.4K bps), 19.2K bps, 28.8K bps, and 57.6K bps. Furthermore, 115.2K bps and 230.2K bps are two communication speeds that will be more widely utilized in the near future. These bit rates greatly exceed the commonly used data communication speeds of just a few years ago.
DTEs often communicate with each other over the public switched telephone network. Each DTE is connected to the telephone network through data communication equipment (DCE). Typically, the DCE will be a modulator/demodulator device, commonly known as a modem.
As is familiar to those skilled in the art, the application program running on the DTE will establish the bit rate of digital data transmitted to the modem. Modems must be capable of receiving data and/or command signals from the DTE at any of a number of bit rates. Therefore, the modem must automatically recognize and adjust to the bit rate of the digital signals being emitted by the DTE.
The name given to the process of analyzing and determining the bit rate of a signal provided from a DTE to a modem is "autobauding." By convention, autobauding is performed only when a modem is in command mode. As is familiar to those skilled in the art, When a modem is in command mode, binary data entering the modem is interpreted as commands to perform certain functions.
Most modern intelligent modems have adopted some form of the AT command set that was developed by the assignee of the present invention. The format of the AT command set is that each command includes the prefix characters "AT" and is terminated by carriage return. If the text line therebetween is recognizable the modem received a valid command, the command is executed by the modem and an appropriate affirmative result code is returned. If the command is unrecognized or invalid, it is ignored and a result code indicating that the command is unexecutable is returned to the data terminal equipment. The modem analyzes the "AT" prefix characters to determine the bit rate of and lock onto the incoming digital data.
More specifically, in the American Standard Code for Information Interchange ("ASCII"), one of many standards for encoding characters in bits, the character "A" is equal to a hexadecimal 41 and the character "T" is equal to hexadecimal 54. Thus, the modem will autobaud when it receives a hexadecimal 41 followed by a hexadecimal 54. In seven bit ASCII code, the bits for these characters are, respectively, 1000001 and 1010100. The format for seven bit ASCII often calls for the use of parity, start and stop bits. The parity bit is set to binary 1 or 0 so that the total number of ones that occur in the resultant eight bit string is always even (even parity) or always odd (odd parity). The parity bit functions as error detection if an odd number of bits in the character is/are flipped during transmission, because the predetermined parity (even or odd) will not be matched by the parity of the character. The eight bit, odd parity "AT" characters are 11000001 and 01010100, respectively.
Typically, the characters will also be framed by one (or more) start and stop bit(s). Before transmission or between characters the data line is usually held high or marking. A start bit of 0 marks the beginning of a character. The communication protocol discussed in the specification includes seven bit character and one parity bit that follow a start bit although the character could be 5, 6, or 8 bits, the parity bit is optional, and other communication protocols could be utilized. For example, one bit stop bit follows the parity bit in the protocol set forth herein, although the stop bit could be 11/2or 2 bits. The stop bit is a logical one or mark condition. The character length, parity, start, and stop bit parameters are agreed upon before data communications between the two modems in a manner familiar to those skilled in the art.
By analyzing the characteristics of the "AT" prefix, a receiving modem can determine the bit timing, character format and parity indication, if any, of the transmitting DTE. In modems manufactured by Hayes Microcomputer Products, Inc. ("Hayes") the originator of the AT command set, the bit rate and character format are determined from each AT prefix that is transmitted from the DTE, and this information is used for character formatting for the balance of the characters that follow the AT prefix.
The above discussion concerns receiving and interpreting commands. Many modems sold today utilize the 68302 CMOS microprocessor and UART chip sold by Motorola Corporation (Schaumburg, Ill.) to receive commands, and to autobaud. Generally stated, when operating in command mode, today's "intelligent" modem using a Motorola Corporation 68302 microprocessor has two internal states of operation: "UART state" and "hardware echo state."
In the UART state, all incoming signals from the DTE are treated as commands. This ability to load and respond to commands is what makes the modem intelligent. The bits in the command characters are serially loaded into a universal asynchronous receiver/transmitter "UART") device, (hence the name "UART state") and then sent in parallel to random access memory (RAM) associated with the microprocessor. The microprocessor analyzes the bytes to determine what command is being sent. The microprocessor acts upon the command, and sends the appropriate response to the DTE through the UART.
Alternatively, the modem operates in the hardware echo state. In the hardware echo state, the incoming command signals are shunted back as output to the DTE. The DTE expects to see an echo of its output signal coming from the modem up to and through receipt of the "AT" prefix. Thus, modems typically will remain in the hardware echo state before receipt of the "AT" characters, and throughout at least part of the "AT" pattern.
When operating in the hardware echo state, modems have a fast pulse clock that is used to sample the incoming data stream during autobanding. The number of samples taken during a bit or bits on the incoming signal during the "AT" character pattern is used to calculate the speed of the incoming signal. For example, the modem may analyze the start bit preceding the "A" character. In modems sold by Hayes, the assignee of the present invention, the modem counts the number of samples it obtains during the start bit, and uses that number to calculate the speed of the incoming signals. Thus, if the modem takes one million samples per second (the clock runs at 1 mHz), and one-hundred samples are taken during the start bit, the incoming signal has a calculated bit rate of 10K bps [(1 mHz/100 samples)=10K bps]. Likewise, if fifty samples are taken during the start bit, the calculated bit rate of the incoming signal is 20K bps [1 mHz/50 samples)=20K bps]. Samples from several bits in the "AT" prefix may be taken to ensure that the calculated bit rate is accurate. In existing modems, the bit rate is either calculated directly from the total number of samples counted during the star bit, or the sample count is compared to a table that associates the sample counts with common bit rates for data signals. In the latter case, the modem is set to operate at the bit rate in the table that is closest to the calculated bit rate. Thus, the modem "autobauds" to the bit rate of the incoming signal.
Generally speaking, in intelligent modems sold today, after uncovering a pattern of bits that match the "AT" pattern, or even a portion of the pattern, the modems switch into the UART state of operation. The modems switch into the UART state to receive and echo the command characters back to the DTE. Specifically, the received character sequence may be "ATSO=1&lt;CR&gt;", where &lt;CR&gt; is a carriage return. The character sequence of "ATSO=1&lt;CR&gt;" is echoed back to the DTE followed by a result code. The signals sent to the DTE indicate that autobauding has successfully occurred.
More specifically described, the UART assembles the incoming signal into bytes and provides the bytes to the microprocessor for analysis. The microprocessor determines the type of command it is receiving and outputs the appropriate response. Typically, the modem is in hardware echo state as it echoes at least part of the "AT" characters, and switches to the UART state to interpret and echo the remainder of the "AT" prefix and the "SO=1&lt;CR&gt;" characters. The result code is generated by the microprocessor and passed to the DTE through the UART. The UART provides the necessary data formatting, such as a start and stop bit, for each character of the result code. The characters sent from the modem to the DTE thus include the echoed command signals, including the AT prefix and the &lt;CR&gt; suffix, plus a predetermined response to acknowledge receipt of the command.
In currently available modems, providing result codes to the DTE while accepting incoming command signals from the DTE is often not possible at high speeds. For example, consider the common situation where the incoming signal contains two contiguous command signals for the modem. The modem will accept the first "AT" pattern and enter the UART state of operation to accept the command characters that are expected to be received after the "AT" prefix. The modem will need to echo the AT prefix, the command characters, and &lt;CR&gt; suffix, as well as to transfer result codes to the DTE to acknowledge receipt of the first command. However, at the same time the result codes are being sent, the DTE may be transmitting the "AT" pattern of the second command in the sequence. The modem cannot autobaud on the second "AT" pattern when it is in the UART state of operation and transmitting the result code. Thus, an incoming command may be completely missed and communications may fail.
A fundamental autobauding problem with prior art modems is the repetitive transition between the hardware echo state and the UART state. The modems will only autobaud in the hardware echo state of operation because existing devices, such as the 68302 microprocessor and UART chip, are incapable of autobauding in the UART state of operation. Likewise, the modem can only transmit result codes in the UART state of operation because, in the hardware echo state the modem only reflects data to the DTE and cannot generate the necessary result codes. Therefore, at very high incoming signal speeds the modem may not be able to switch between states quickly enough to respond to the various incoming signals.
Another aspect of autobauding in existing modems is the significant mount of microprocessor time consumed searching among the voluminous number of samples taken to find the center sample of each incoming bit. Specifically, when operating in the hardware echo state, modems today typically calculate the bit length of the incoming dam and then laboriously count a calculated number of samples to move from one center sample to the next. This requires significant devotion of the microprocessor time to one task.
Therefore, there is a need for a method and apparatus for autobauding that does not require that the modem switch between modes of operation when receiving commands.
Furthermore, there is a need for a method and apparatus that autobauds and detects incoming bits with less devotion of the microprocessor.
Furthermore, there is a need for a method and apparatus for autobanding at high speeds.